'use strict'

 const { DataTypes, Model, Op } = require('../../../azeroth').sequelize;
 class Station_2 extends Model { }

  const initStationData_2 = (sequelize_aim) => {
    Station_2.init(
         {
            id: {
                type: DataTypes.INTEGER,
                allowNull: false,
                primaryKey: true
              },
              station_id: {
                type: DataTypes.INTEGER,
                allowNull: true
              },
              station_name: {
                type: DataTypes.STRING(255),
                allowNull: true
              }
         }, 
         {
             freezeTableName: true,
             sequelize: sequelize_aim,
             modelName: 'station',
             timestamps: false
         }
     )
  }

  Station_2.upload = async (data) => {
     let res = await Station_2.bulkCreate(data, {updateOnDuplicate: ['id']});
     return res;
 }

 module.exports = {
     Station_2,
     initStationData_2
 };